/*******************************************************************
 *
 * Copyright (C), 2022-2027, YouGan, All rights reserved.
 *
 * Author      : zhaoyang
 * Create Time : 2022-10-13
 * Version     : v0.1
 * Description : 
 *******************************************************************/

#ifndef __BOARD_CFG_H__
#define __BOARD_CFG_H__


#if 0
#define PPT_RX_PIN_NUMBER       31      //串口接收ppg心率值pin
#define MCU_TX_PIN_NUMBER       29      //串口发送给主控MCU数据pin
#endif

//屏幕控制
#define SH8501A0_TOUCH_POWER_PIN        12      //P0.12
#define SH8501A0_POWER_PIN              32      //P1.00

#define SH8501A0_TE_PIN                 39      //P1.07
#define SH8501A0_RST_PIN                37      //P1.05

#define SH8501A0_QSPI_CSN_PIN           23      //p0.23
#define SH8501A0_QSPI_SCK_PIN           25      //p0.25
#define SH8501A0_QSPI_IO0_PIN           33      //p1.01
#define SH8501A0_QSPI_IO1_PIN           35      //p1.03
#define SH8501A0_QSPI_IO2_PIN           21      //p0.21
#define SH8501A0_QSPI_IO3_PIN           19      //p0.19

#define SH8501A0_TP_RST                 13      //P0.13
#define SH8501A0_TP_INT                 15      //P0.15



//WM8978控制
#define I2C_WM8978_PIN_SLC              8	
#define I2C_WM8978_PIN_SDA              6	

#define I2S_WM8978_PIN_MCLK             41      //P1.09
#define I2S_WM8978_PIN_SCLK             5       //P0.05
#define I2S_WM8978_PIN_LRC              7       //P0.07
#define I2S_WM8978_PIN_SDOUT            40      //P1.08
#define I2S_WM8978_PIN_SDIN             11      //P0.11

//flash SPI引脚定义
#define SPI_SS_PIN                      34      //p1.02
#define SPI_SCK_PIN                     24      //p0.24
#define SPI_MISO_PIN                    36      //p1.04
#define SPI_MOSI_PIN                    22      //p0.22

#define FLASH_WP                        38      //p1.06

//电池电压
#define BAT_ADC_PIN                     4       //ADC采集p0.04 AIN2
#define BAT_CHG_PIN                     16      //充电检测p0.16; 设置高阻态
#define BAT_CHG_FULL_PIN                14      //满电检测p0.14; 设置高阻态

//gh3026 引脚定义
//心率供电控制
#define  GH3026_PWR_PIN                 2       //p0.02     //心率和3轴供电控制pin

#define SPI_GH3026_SS_PIN               45      //p1.13
#define SPI_GH3026_SCK_PIN              44      //p1.12
#define SPI_GH3026_MISO_PIN             42      //p1.10
#define SPI_GH3026_MOSI_PIN             43      //p1.11

#define GH3026_RST_PIN                  28      //p0.28
#define GH3026_INT_PIN                  3       //p0.03

/* Gensor I2C PIN */
#define I2C_GSENSOR_PIN_SLC             17      //p0.17	
#define I2C_GSENSOR_PIN_SDA             20	    //p0.20
#define I2C_GSENSOR_PIN_INT             30	    //p0.30


#define POWER_OFF_TIME_CNT              (30*60) //自动关机时间，单位：秒


#endif // __BOARD_CFG_H__

